<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>
  <script src="../dev/vendors/vue.js"></script>
  <div id="app">
    <div class="static" v-bind:class="classObject">我是DIV</div>
    <div v-bind:class="[isActive ? activeClass : 'a123', errorClass]">数组</div>
  </div>
  <script>
    var vm = new Vue({
      el: '#app',
      data: {
        activeClass: 'active',
        errorClass: 'text-danger',
        isActive: true,
        classObject: {
          isActive: true,
          hasError: false
        }
      }
    })
  </script>
</body>

</html>